/**
 *
 */
package org.suren.littlebird.actions.logger;

import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.widgets.Table;
import org.suren.littlebird.actions.Reload;

/**
 * @author suren
 * @since 2015-2-2
 */
public class SuRenLoggerSetErrorAction extends AbstractSuRenLoggerSetAction
{
	private Reload reload;
	private SuRenLoggerController controller;
	private Table table;

	/**
	 * @param reload
	 */
	public SuRenLoggerSetErrorAction(Table table, Reload reload)
	{
		this.table = table;
		this.reload = reload;
		this.controller = new DefaultSuRenLoggerController();
	}

	@Override
	public String getText()
	{
		return "Error";
	}

	@Override
	public String getToolTipText()
	{
		return "Reset to Error Level";
	}

	@Override
	public void setImageDescriptor(ImageDescriptor newImage)
	{
		super.setImageDescriptor(newImage);
	}

	@Override
	public void run()
	{
		control(table, controller, reload, SuRenLoggerController.LEVEL_ERROR);
	}

}
